package com.pmp.pojo;

import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

/**
 * Created by think on 2017/1/2.
 */
@Alias("user")
public class User implements Serializable {
    private String userId;
    private String username;//用户名
    private String password;//密码
    private String name;//姓名
    private char sex;//性别
    private String mobile;//联系方式
    private String email;//邮件地址
    private String state;//状态
    private String description;//说明
    private Date updateDate = new Date();//创建时间

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        if(userId == null){
            this.userId = UUID.randomUUID().toString();
        }else{
            this.userId = userId;
        }
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }
}
